<?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
<!--?xsltforms-options debug="yes"?-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xforms="http://www.w3.org/2002/xforms"
	xmlns:ev="http://www.w3.org/2001/xml-events"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<head>
	<title>Management User</title>
	<meta charset="UTF-8" />
	<xforms:model>
		<xforms:instance id="user" src="./views/data/user.xml" />
		<xforms:instance id="select" src="./views/data/entities.xml" />
		<xforms:instance id="users">
			<users>
				<user>
					<name>Handy</name>
					<password></password>
					<entityCode>PT. A</entityCode>
				</user>
				<user>
					<name>Johny</name>
					<password></password>
					<entityCode>PT. C</entityCode>
				</user>
				<user>
					<name>Rahmat</name>
					<password></password>
					<entityCode>PT. B</entityCode>
				</user>
				<user>
					<name>Dodo</name>
					<password></password>
					<entityCode>PT. C</entityCode>
				</user>
			</users>
		</xforms:instance>
		<xforms:bind id="username" nodeset="instance('user')/drupalProperties/name" />
		<xforms:bind id="password" nodeset="instance('user')/drupalProperties/pass" />
		<xforms:bind id="entity" nodeset="instance('user')/applicationProperties/entityCode" />
	</xforms:model>
	<style>
	/*
		.xforms-group-content {
			margin-top: 20px;
			margin-left: auto;
			margin-right: auto;
			width: 200px;
			border: 1px solid #000000;
		}
		
		.xforms-label,.xforms-value {
			margin-left: 10px;
			margin-top: 5px;
			display: block;
		}
		
		.xforms-value {
			display: block;
		}
		
		.grid-list {
			float: right;
		}
		*/
	</style>
</head>
<body>
	<xforms:group>
		<xforms:input bind="username">
			<xforms:label>Username</xforms:label>
		</xforms:input>
		<xforms:secret bind="password">
			<xforms:label>Password</xforms:label>
		</xforms:secret>
		<xforms:select1 bind="entity" appearance="min">
			<xforms:label>Perusahaan</xforms:label>
			<xforms:itemset nodeset="instance('select')/entity">
				<xforms:value ref="uuid" />
				<xforms:label ref="namaEntitas" />
			</xforms:itemset>
		</xforms:select1>
	</xforms:group>
	<xforms:group id="grid-list">
		<table>
			<thead>
				<tr>
					<th>Username</th>
					<th>Perusahaan</th>
				</tr>
			</thead>
			<tbody>
				<xforms:repeat id="user-list" nodeset="instance('users')/user">
					<tr>
						<td><xforms:output ref="name" /></td>
						<td><xforms:output ref="entityCode" /></td>
					</tr>
				</xforms:repeat>
			</tbody>
		</table>
	</xforms:group>
</body>
</html>
